package com.jason.redCherry.dao.Impl;

import com.jason.redCherry.base.BaseMyBatisDaoSupport;
import com.jason.redCherry.dao.JSMapper;
import com.jason.redCherry.entity.JS;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Jason on 2016/9/6.
 */
@Repository
public class JSMapperImpl extends BaseMyBatisDaoSupport implements JSMapper {

    public static String NAME = "com.jason.redCherry.dao.JSMapper.";

    public int deleteByPrimaryKey(String jsId) {
        return this.getSqlSession().delete(NAME + "deleteByPrimaryKey", jsId);
    }

    public int insert(JS record) {
        return this.getSqlSession().insert(NAME + "insert", record);
    }

    public JS selectByPrimaryKey(String jsId) {
        return null;
    }

    public List<JS> selectAll() {
        return this.getSqlSession().selectList(NAME + "selectAll");
    }

    public int updateByPrimaryKey(JS record) {
        return this.getSqlSession().update(NAME + "updateByPrimaryKey", record);
    }
}
